<!-- HTML header for doxygen 1.8.18-->
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=9" />
    <meta name="generator" content="Doxygen 1.8.16" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>LEAF: LEAF/Inc/leaf-global.h Source File</title>
    <link href="tabs.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="jquery.js"></script>
    <script type="text/javascript" src="dynsections.js"></script>
    <script type="text/javascript" src="../js/iframeResizer.contentWindow.min.js"></script>
    <!-- <script src="/js/template.js"></script> -->
     <link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(function() { init_search(); });
/* @license-end */
</script> 
    <link href="doxygen.css" rel="stylesheet" type="text/css" />
    <link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
    <!-- <link rel="stylesheet" href="/css/tachyons.css" type="text/css" /> -->
</head>
<body class="bg-washed-green black-70 ph0 sans-serif" onload="iframeResizePipe()">
    <div>
        <!-- do not remove this div, it is closed by doxygen! -->
        <div id="titlearea">
            <table cellspacing="0" cellpadding="0">
                <tbody>
                    <tr>
                    </tr>
                </tbody>
            </table>
        </div>
        <!-- end header part -->
    </div>
</body>
</html><!-- Generated by Doxygen 1.8.16 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_127e6aa213d41105176fe0c3bbb2560c.html">LEAF</a></li><li class="navelem"><a class="el" href="dir_2638202b9749e6ce2c919e410b7e2f43.html">Inc</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">leaf-global.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> ==============================================================================</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> </span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> leaf-global.h</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> Created: 24 Oct 2019 2:24:38pm</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> Author:  Matthew Wang</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> </span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> ==============================================================================</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160; </div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor">#ifndef LEAF_GLOBAL_H_INCLUDED</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="preprocessor">#define LEAF_GLOBAL_H_INCLUDED</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160; </div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;    </div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="preprocessor">#include &quot;leaf-mempool.h&quot;</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;    </div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="preprocessor">#if _WIN32 || _WIN64</span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="preprocessor">#include &quot;..\leaf-config.h&quot;</span></div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="preprocessor">#else</span></div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="preprocessor">#include &quot;../leaf-config.h&quot;</span></div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;    </div>
<div class="line"><a name="l00031"></a><span class="lineno"><a class="line" href="struct_l_e_a_f.html">   31</a></span>&#160;    <span class="keyword">struct </span><a class="code" href="struct_l_e_a_f.html">LEAF</a></div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;    {</div>
<div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="struct_l_e_a_f.html#af6a61da668f2188e2850eba261e217c4">   34</a></span>&#160;        <span class="keywordtype">float</span>   <a class="code" href="struct_l_e_a_f.html#af6a61da668f2188e2850eba261e217c4">sampleRate</a>; </div>
<div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="struct_l_e_a_f.html#ae4c744f56f561ff4acc66ba4bd3ed201">   35</a></span>&#160;        <span class="keywordtype">float</span>   <a class="code" href="struct_l_e_a_f.html#ae4c744f56f561ff4acc66ba4bd3ed201">invSampleRate</a>; </div>
<div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="struct_l_e_a_f.html#a4aaa73e329d20f35039fa5cdd2e6f648">   36</a></span>&#160;        <span class="keywordtype">int</span>     <a class="code" href="struct_l_e_a_f.html#a4aaa73e329d20f35039fa5cdd2e6f648">blockSize</a>; </div>
<div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="struct_l_e_a_f.html#aabd759d3fcb8411249ab4813424e6b29">   37</a></span>&#160;        <span class="keywordtype">float</span>   <a class="code" href="struct_l_e_a_f.html#aabd759d3fcb8411249ab4813424e6b29">twoPiTimesInvSampleRate</a>; </div>
<div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="struct_l_e_a_f.html#a8b5a79e58a190779d202a188f82e9e86">   38</a></span>&#160;        float   (*<a class="code" href="struct_l_e_a_f.html#a8b5a79e58a190779d202a188f82e9e86">random</a>)(void); </div>
<div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="struct_l_e_a_f.html#ad65a59f4aa73365d2e77aeddfca7a449">   39</a></span>&#160;        <span class="keywordtype">int</span>     <a class="code" href="struct_l_e_a_f.html#ad65a59f4aa73365d2e77aeddfca7a449">clearOnAllocation</a>; </div>
<div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="struct_l_e_a_f.html#a8bcf1ce65df673f85688cca6f0883723">   40</a></span>&#160;        tMempool <a class="code" href="struct_l_e_a_f.html#a8bcf1ce65df673f85688cca6f0883723">mempool</a>; </div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;        _tMempool _internal_mempool;</div>
<div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="struct_l_e_a_f.html#a64f1d0c53909f30b0aac882348cd32f2">   42</a></span>&#160;        <span class="keywordtype">size_t</span> <a class="code" href="struct_l_e_a_f.html#a64f1d0c53909f30b0aac882348cd32f2">header_size</a>; </div>
<div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="struct_l_e_a_f.html#a7c7ae1db705b3fdea2bec18add896856">   43</a></span>&#160;        void (*<a class="code" href="struct_l_e_a_f.html#a7c7ae1db705b3fdea2bec18add896856">errorCallback</a>)(<a class="code" href="struct_l_e_a_f.html">LEAF</a>* <span class="keyword">const</span>, LEAFErrorType); </div>
<div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="struct_l_e_a_f.html#afdc66be5b816adc061930cf832328a44">   44</a></span>&#160;        <span class="keywordtype">int</span>     <a class="code" href="struct_l_e_a_f.html#afdc66be5b816adc061930cf832328a44">errorState</a>[LEAFErrorNil]; </div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;        </div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;    };</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;    </div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;    <span class="comment">//==============================================================================</span></div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;    </div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;}</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160; </div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;<span class="preprocessor">#endif  // LEAF_GLOBAL_H_INCLUDED</span></div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160; </div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;<span class="comment">//==============================================================================</span></div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160; </div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160; </div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="astruct_l_e_a_f_html_a4aaa73e329d20f35039fa5cdd2e6f648"><div class="ttname"><a href="struct_l_e_a_f.html#a4aaa73e329d20f35039fa5cdd2e6f648">LEAF::blockSize</a></div><div class="ttdeci">int blockSize</div><div class="ttdoc">The audio block size.</div><div class="ttdef"><b>Definition:</b> leaf-global.h:36</div></div>
<div class="ttc" id="astruct_l_e_a_f_html_afdc66be5b816adc061930cf832328a44"><div class="ttname"><a href="struct_l_e_a_f.html#afdc66be5b816adc061930cf832328a44">LEAF::errorState</a></div><div class="ttdeci">int errorState[LEAFErrorNil]</div><div class="ttdoc">An array of flags that indicate which errors have occurred.</div><div class="ttdef"><b>Definition:</b> leaf-global.h:44</div></div>
<div class="ttc" id="astruct_l_e_a_f_html_a8b5a79e58a190779d202a188f82e9e86"><div class="ttname"><a href="struct_l_e_a_f.html#a8b5a79e58a190779d202a188f82e9e86">LEAF::random</a></div><div class="ttdeci">float(* random)(void)</div><div class="ttdoc">A pointer to the random() function provided on initialization.</div><div class="ttdef"><b>Definition:</b> leaf-global.h:38</div></div>
<div class="ttc" id="astruct_l_e_a_f_html_ad65a59f4aa73365d2e77aeddfca7a449"><div class="ttname"><a href="struct_l_e_a_f.html#ad65a59f4aa73365d2e77aeddfca7a449">LEAF::clearOnAllocation</a></div><div class="ttdeci">int clearOnAllocation</div><div class="ttdoc">A flag that determines whether memory allocated from the LEAF memory pool will be cleared.</div><div class="ttdef"><b>Definition:</b> leaf-global.h:39</div></div>
<div class="ttc" id="astruct_l_e_a_f_html_aabd759d3fcb8411249ab4813424e6b29"><div class="ttname"><a href="struct_l_e_a_f.html#aabd759d3fcb8411249ab4813424e6b29">LEAF::twoPiTimesInvSampleRate</a></div><div class="ttdeci">float twoPiTimesInvSampleRate</div><div class="ttdoc">Two-pi times the inverse of the current sample rate.</div><div class="ttdef"><b>Definition:</b> leaf-global.h:37</div></div>
<div class="ttc" id="astruct_l_e_a_f_html_a7c7ae1db705b3fdea2bec18add896856"><div class="ttname"><a href="struct_l_e_a_f.html#a7c7ae1db705b3fdea2bec18add896856">LEAF::errorCallback</a></div><div class="ttdeci">void(* errorCallback)(LEAF *const, LEAFErrorType)</div><div class="ttdoc">A pointer to the callback function for LEAF errors. Can be set by the user.</div><div class="ttdef"><b>Definition:</b> leaf-global.h:43</div></div>
<div class="ttc" id="astruct_l_e_a_f_html_a8bcf1ce65df673f85688cca6f0883723"><div class="ttname"><a href="struct_l_e_a_f.html#a8bcf1ce65df673f85688cca6f0883723">LEAF::mempool</a></div><div class="ttdeci">tMempool mempool</div><div class="ttdoc">The default LEAF mempool object.</div><div class="ttdef"><b>Definition:</b> leaf-global.h:40</div></div>
<div class="ttc" id="astruct_l_e_a_f_html_af6a61da668f2188e2850eba261e217c4"><div class="ttname"><a href="struct_l_e_a_f.html#af6a61da668f2188e2850eba261e217c4">LEAF::sampleRate</a></div><div class="ttdeci">float sampleRate</div><div class="ttdoc">The current audio sample rate. Set with LEAF_setSampleRate().</div><div class="ttdef"><b>Definition:</b> leaf-global.h:34</div></div>
<div class="ttc" id="astruct_l_e_a_f_html_a64f1d0c53909f30b0aac882348cd32f2"><div class="ttname"><a href="struct_l_e_a_f.html#a64f1d0c53909f30b0aac882348cd32f2">LEAF::header_size</a></div><div class="ttdeci">size_t header_size</div><div class="ttdoc">The size in bytes of memory region headers within mempools.</div><div class="ttdef"><b>Definition:</b> leaf-global.h:42</div></div>
<div class="ttc" id="astruct_l_e_a_f_html_ae4c744f56f561ff4acc66ba4bd3ed201"><div class="ttname"><a href="struct_l_e_a_f.html#ae4c744f56f561ff4acc66ba4bd3ed201">LEAF::invSampleRate</a></div><div class="ttdeci">float invSampleRate</div><div class="ttdoc">The inverse of the current sample rate.</div><div class="ttdef"><b>Definition:</b> leaf-global.h:35</div></div>
<div class="ttc" id="astruct_l_e_a_f_html"><div class="ttname"><a href="struct_l_e_a_f.html">LEAF</a></div><div class="ttdoc">Struct for an instance of LEAF.</div><div class="ttdef"><b>Definition:</b> leaf-global.h:31</div></div>
<!-- HTML footer for doxygen 1.8.18-->
<!-- start footer part -->
</body>
</html>
